package com.pany.domain;

import java.util.List;

/**
 * 
 * 查询列表父类,所有的查询条件用AND拼接,所有查询列表的请求继承自该类
 * 
 * @author 曾杰
 * @since 2012-10-28/V0.1
 */
public abstract class ConditionRequest extends Request
{

    /**
     * 查询条件
     */
    private List<Condition> conditions;

    /**
     * 排序字段
     */
    private List<OrderField> orderFields;

    /**
     * 请求数量
     */
    private int count;

    /**
     * 请求第几页
     */
    private int page;

    public List<Condition> getConditions()
    {
        return conditions;
    }

    public void setConditions(List<Condition> conditions)
    {
        this.conditions = conditions;
    }

    public List<OrderField> getOrderFields()
    {
        return orderFields;
    }

    public void setOrderFields(List<OrderField> orderFields)
    {
        this.orderFields = orderFields;
    }

    public int getCount()
    {
        return count;
    }

    public void setCount(int count)
    {
        this.count = count;
    }

    public int getPage()
    {
        return page;
    }

    public void setPage(int page)
    {
        this.page = page;
    }

    /**
     * 获取该请求要查询的实体的类型
     * 
     * @return
     */
    public abstract Class<?> getEntityType();

}
